<?php

require_once(dirname(__FILE__)."/config.php");
require_once(DEDEINC."/oxwindow.class.php");
if(empty($dopost)) $dopost = '';
if(empty($fmdo)) $fmdo = '';
$ENV_GOBACK_URL = isset($_COOKIE['ENV_GOBACK_URL']) ? 'member_renzheng.php' : '';
if ($dopost=="renzhengok")
{
    CheckPurview('tixian_Edit');
	$mid = preg_replace("#[^0-9]#", "", $mid);
	$dsql->ExecuteNoneQuery("UPDATE `#@__member` SET renzheng=2 WHERE mid='$mid'");
	$dsql->ExecuteNoneQuery("UPDATE `#@__member` SET rank=1000 WHERE mid='$mid'");
    ShowMsg("审核操作已成功",$ENV_GOBACK_URL);
    exit();
}else if ($dopost=="renzhengno")
{
    CheckPurview('tixian_Edit');
	$mid = preg_replace("#[^0-9]#", "", $mid);
	$dsql->ExecuteNoneQuery("UPDATE `#@__member` SET renzheng=3 WHERE mid='$mid'");
    ShowMsg("拒绝操作已成功",$ENV_GOBACK_URL);
    exit();
}else{
	ShowMsg("未知错误",$ENV_GOBACK_URL);
}